BEGIN;

ALTER TABLE feature
ALTER COLUMN created_at TYPE TIMESTAMPTZ(6),
ALTER COLUMN updated_at TYPE TIMESTAMPTZ(6),
ALTER COLUMN deleted_at TYPE TIMESTAMPTZ(6),
ALTER COLUMN deleted_at SET DEFAULT NULL;

ALTER TABLE object
ALTER COLUMN created_at TYPE TIMESTAMPTZ(6),
ALTER COLUMN updated_at TYPE TIMESTAMPTZ(6),
ALTER COLUMN deleted_at TYPE TIMESTAMPTZ(6),
ALTER COLUMN deleted_at SET DEFAULT NULL;

ALTER TABLE object_type
ALTER COLUMN created_at TYPE TIMESTAMPTZ(6),
ALTER COLUMN updated_at TYPE TIMESTAMPTZ(6),
ALTER COLUMN deleted_at TYPE TIMESTAMPTZ(6),
ALTER COLUMN deleted_at SET DEFAULT NULL;

ALTER TABLE permission
ALTER COLUMN created_at TYPE TIMESTAMPTZ(6),
ALTER COLUMN updated_at TYPE TIMESTAMPTZ(6),
ALTER COLUMN deleted_at TYPE TIMESTAMPTZ(6),
ALTER COLUMN deleted_at SET DEFAULT NULL;

ALTER TABLE pricing_tier
ALTER COLUMN created_at TYPE TIMESTAMPTZ(6),
ALTER COLUMN updated_at TYPE TIMESTAMPTZ(6),
ALTER COLUMN deleted_at TYPE TIMESTAMPTZ(6),
ALTER COLUMN deleted_at SET DEFAULT NULL;

ALTER TABLE role
ALTER COLUMN created_at TYPE TIMESTAMPTZ(6),
ALTER COLUMN updated_at TYPE TIMESTAMPTZ(6),
ALTER COLUMN deleted_at TYPE TIMESTAMPTZ(6),
ALTER COLUMN deleted_at SET DEFAULT NULL;

ALTER TABLE tenant
ALTER COLUMN created_at TYPE TIMESTAMPTZ(6),
ALTER COLUMN updated_at TYPE TIMESTAMPTZ(6),
ALTER COLUMN deleted_at TYPE TIMESTAMPTZ(6),
ALTER COLUMN deleted_at SET DEFAULT NULL;

ALTER TABLE "user"
ALTER COLUMN created_at TYPE TIMESTAMPTZ(6),
ALTER COLUMN updated_at TYPE TIMESTAMPTZ(6),
ALTER COLUMN deleted_at TYPE TIMESTAMPTZ(6),
ALTER COLUMN deleted_at SET DEFAULT NULL;

ALTER TABLE warrant
ALTER COLUMN created_at TYPE TIMESTAMPTZ(6),
ALTER COLUMN updated_at TYPE TIMESTAMPTZ(6),
ALTER COLUMN deleted_at TYPE TIMESTAMPTZ(6),
ALTER COLUMN deleted_at SET DEFAULT NULL;

COMMIT;
